﻿<!DOCTYPE html>
<html>
<head>
       <title>平面坐标系图层</title>
        <style type="text/css">
            body{
                margin: 0;
                overflow: hidden;
                background: #fff;
            }
            #map{
                position: relative;
                height: 553px;
                border:1px solid #3473b7;
            }
        </style>
    <link href='./css/bootstrap.min.css' rel='stylesheet' />
    <link href='./css/bootstrap-responsive.min.css' rel='stylesheet' />
		<script src = '../libs/SuperMap.Include.js'></script>
        <script type="text/javascript">
            var map,layer,
           host = document.location.toString().match(/file:\/\//)?"http://localhost:8090":'http://' + document.location.host,
            url=host+"/iserver/services/map-changchun/rest/maps/长春市区图";
			function init()
			{
			    map = new SuperMap.Map("map",{controls:[
                    new SuperMap.Control.Navigation() ,
                    new SuperMap.Control.Zoom()]});
                map.addControl(new SuperMap.Control.MousePosition());
				layer = new SuperMap.Layer.TiledDynamicRESTLayer("China", url, null, {maxResolution:"auto"});
                layer.events.on({"layerInitialized": addLayer});   
			}
			function addLayer()
			{
			   map.addLayer(layer);
			    map.setCenter(new SuperMap.LonLat(5105, -3375),0);
			}
	 </script>
</head>
<body onLoad = "init()">
   <div id = "map"></div>
</body>
</html>